how set variable public in static method in laravel

121

how set variable public in static method in laravel -

class ContentController extends BaseController {

    public static $text = null;

    public static function getContent($description)
    {
        $content = Content::where('description', $description)->first();
        return static::$text = $content->text;
    }
}

Comments

Submit
0 Comments